package com.digitalchina.lxnsy.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import android.view.ViewGroup;

import java.util.ArrayList;

/**
 * ================================================
 * 项目名称：YLCloud
 * 类描述：
 * 包名：com.digitalchina.ylcloud.adapter
 * 创建人：郑皓
 * 创建时间：2016/5/19 18:15
 * 修改备注：
 * ================================================
 */

public class MainV4FragmentAdapter extends FragmentPagerAdapter {
    ArrayList<Fragment> list;

    public MainV4FragmentAdapter(FragmentManager fm, ArrayList<Fragment> list) {
        super(fm);
        if (list != null) {
            this.list = list;
        } else {
            this.list = new ArrayList<>();
        }
    }




    @Override
    public Fragment getItem(int position) {

        return list.get(position);
    }

    @Override
    public int getCount() {

        return list.size();
    }

    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
    }

}

